package com.xiaoq.sites.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.xiaoq.sites.entity.SitesAnnouncementEntity;
import com.xiaoq.sites.repository.IAnnouncementRepository;
import com.xiaoq.sites.service.IAnnouncementService;
import com.xiaoq.vo.PagingVo;

@Component
public class AnnouncementServiceImpl implements IAnnouncementService {
	
	@Autowired 
	private IAnnouncementRepository iAnnouncementRep;

	@Override
	public List<SitesAnnouncementEntity> findAnnBySites(PagingVo pvo, String sitesId) {
		
		return iAnnouncementRep.findAnnBySites(pvo, sitesId);
	}

	@Override
	public boolean addSitesAnnounment(SitesAnnouncementEntity sitesAnnouncementEntity) {
		return iAnnouncementRep.addSitesAnnouncement(sitesAnnouncementEntity);
	}

	@Override
	public boolean delSitesAnnounment(String annId) {
		return iAnnouncementRep.delSitesAnnoment(annId);
	}

	@Override
	public boolean invalSitesAnnounment(String annId) {
		return iAnnouncementRep.invalSitesAnnounment(annId);
	}

	@Override
	public boolean editSitesAnnounment(SitesAnnouncementEntity sitesAnnouncementEntity) {
		
		return iAnnouncementRep.editeSitesAnnounment(sitesAnnouncementEntity);
	}

	@Override
	public List<SitesAnnouncementEntity> findAnnByCity(PagingVo pvo, String zoneCity,String zoneDistrict) {
		
		return iAnnouncementRep.findAnnByCity(pvo, zoneCity,zoneDistrict);
	}

	@Override
	public SitesAnnouncementEntity getSitesAnnounce(String id) {
		return iAnnouncementRep.getSitesAnnounce(id);
	}



}
